const Koa = require('koa')
const Router = require('koa-router')
const views = require('koa-views')
const static = require('koa-static')
let app = new Koa()
let router = new Router()
app.use(views(__dirname + '/views'))
app.use(static(__dirname + '/static'))
router.get('/index', async ctx => {
    await ctx.render('index.html')
})
router.get('/product', async ctx => {
    await ctx.render('product.html')
})
router.get('/b', async ctx => {
    await ctx.render('b.html')
})
app.use(router.routes())
app.listen(8989)